package io.gitee.zhangbinhub.admin.oauth.repo

import io.gitee.zhangbinhub.admin.oauth.base.BaseRepository
import io.gitee.zhangbinhub.admin.oauth.entity.ModuleFunc
import java.util.*

/**
 * @since JDK 11
 */
interface ModuleFuncRepository : BaseRepository<ModuleFunc, String> {

    fun findByCode(code: String): Optional<ModuleFunc>

    fun findByCodeAndIdNot(code: String, id: String): Optional<ModuleFunc>

    fun findByAppId(appId: String): MutableList<ModuleFunc>

    fun findByParentIdIn(idList: MutableList<String>): MutableList<ModuleFunc>

    fun deleteByIdInAndCovert(idList: MutableList<String>, covert: Boolean)

}
